package edu.bit.water.service;

import java.sql.SQLSyntaxErrorException;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.BadSqlGrammarException;
import org.springframework.stereotype.Service;

import edu.bit.water.dao.MetaEvaWsrcInfoAssociationDao;
import edu.bit.water.entity.MetaEvaWsrcInfo;

@Service
public class MetaEvaWsrcInfoAssociationService {

	@Autowired
	private MetaEvaWsrcInfoAssociationDao metaEvaWsrcInfoAssociationDao;
	
	/**
	 * 
	 * @param metaEvaWsrcInfo 元数据水平衡评估实体类
	 * @return 成功返回1，失败返回0
	 * @throws BadSqlGrammarException
	 */
	public int insertMetaEvaWsrcInfoAssociation(MetaEvaWsrcInfo metaEvaWsrcInfo) throws BadSqlGrammarException{
		int n = metaEvaWsrcInfoAssociationDao.insertMetaEvaWsrcInfoAssociation(metaEvaWsrcInfo);
		return n;
	}

	public int updateMetaEvaWsrcInfoAssociation(MetaEvaWsrcInfo metaEvaWsrcInfo) throws BadSqlGrammarException{

			int n = metaEvaWsrcInfoAssociationDao.updateMetaEvaWsrcInfoAssociation(metaEvaWsrcInfo);
			return n;

	}
	
	/**
	 * 
	 * @param metaEvaWsrcInfo 元数据水平衡评估实体类
	 * @return 成功返回1，失败返回0
	 */
	public int deleteMetaEvaWsrcInfoAssociation(MetaEvaWsrcInfo metaEvaWsrcInfo) {
		int n = metaEvaWsrcInfoAssociationDao.deleteMetaEvaWsrcInfoAssociation(metaEvaWsrcInfo);
		return n;
	}
}
